package com.heima.model.common.dtos;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;


@Slf4j
public class PageRequestDto<T> {


    protected Integer size;
    protected Integer page;
    //用于多条件查询
    protected T body;

    public Integer getSize() {
        return size==null? 10 :size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public Integer getPage() {
        return (page==null || page<=0)? 1:page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public T getBody() {
        return body;
    }

    public void setBody(T body) {
        this.body = body;
    }

    public static Logger getLog() {
        return log;
    }
}
